package com.mpyy.handler.purchase;

import com.mpyy.dao.ToolInter;
import com.mpyy.pojo.ManufactureridInfo;
import com.mpyy.service.purchase.UpdatemanufacturerInfoServiceInter;
import com.mpyy.tool.Tool;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

/**
 * @version 1.0
 * @Descoription UpdatemanufacturerInfoHandler
 * @Author CG
 * @date 2022-03-25
 */
@Controller
public class UpdatemanufacturerInfoHandler {
    @Autowired
    @Qualifier(value = "updatemanufacturerInfoServiceImpl")
    private UpdatemanufacturerInfoServiceInter updatemanufacturerInfoServiceInter;
    @Autowired
    private ToolInter toolInter;
    @RequestMapping(value = "/updatemanufacturerInfo")
    @ResponseBody
    public String updatemanufacturerInfo(ManufactureridInfo manufactureridInfo){

        manufactureridInfo.setManufacturerId(new Tool().aotomaticId(manufactureridInfo.getManufacturerId(),toolInter));
        int i = updatemanufacturerInfoServiceInter.updatemanufacturerInfo(manufactureridInfo);

        return String.valueOf(manufactureridInfo);
    }
}
